<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Aria: ArRobotPacketSender Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Aria
   &#160;<span id="projectnumber">2.9.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classArRobotPacketSender.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classArRobotPacketSender-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ArRobotPacketSender Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Given a device connection this sends commands through it to the robot.  
 <a href="classArRobotPacketSender.html#details">More...</a></p>

<p><code>#include &lt;ArRobotPacketSender.h&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3d6164270a77da60766268ecaf839a84"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#a3d6164270a77da60766268ecaf839a84">ArRobotPacketSender</a> (unsigned char sync1=0xfa, unsigned char sync2=0xfb)</td></tr>
<tr class="memdesc:a3d6164270a77da60766268ecaf839a84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor without an already assigned device connection.  <a href="#a3d6164270a77da60766268ecaf839a84">More...</a><br /></td></tr>
<tr class="separator:a3d6164270a77da60766268ecaf839a84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71f0b04f8f8d4ecc81d0aee323079996"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#a71f0b04f8f8d4ecc81d0aee323079996">ArRobotPacketSender</a> (<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *deviceConnection, unsigned char sync1=0xfa, unsigned char sync2=0xfb)</td></tr>
<tr class="memdesc:a71f0b04f8f8d4ecc81d0aee323079996"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor with assignment of a device connection.  <a href="#a71f0b04f8f8d4ecc81d0aee323079996">More...</a><br /></td></tr>
<tr class="separator:a71f0b04f8f8d4ecc81d0aee323079996"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a1324a9c7633a816fa3f20750e95471"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#a5a1324a9c7633a816fa3f20750e95471">ArRobotPacketSender</a> (<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *deviceConnection, unsigned char sync1, unsigned char sync2, bool tracking, const char *trackingLogName)</td></tr>
<tr class="memdesc:a5a1324a9c7633a816fa3f20750e95471"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor with assignment of a device connection and tracking.  <a href="#a5a1324a9c7633a816fa3f20750e95471">More...</a><br /></td></tr>
<tr class="separator:a5a1324a9c7633a816fa3f20750e95471"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b3525b655931338b9b06d23260caa86"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#a8b3525b655931338b9b06d23260caa86">com</a> (unsigned char command)</td></tr>
<tr class="memdesc:a8b3525b655931338b9b06d23260caa86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a command to the robot with no arguments.  <a href="#a8b3525b655931338b9b06d23260caa86">More...</a><br /></td></tr>
<tr class="separator:a8b3525b655931338b9b06d23260caa86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a972697332d4a79d31472941e54780506"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#a972697332d4a79d31472941e54780506">com2Bytes</a> (unsigned char command, char high, char low)</td></tr>
<tr class="memdesc:a972697332d4a79d31472941e54780506"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a command to the robot with two bytes for argument.  <a href="#a972697332d4a79d31472941e54780506">More...</a><br /></td></tr>
<tr class="separator:a972697332d4a79d31472941e54780506"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2585921fec3edc926665adeedf3a4d59"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2585921fec3edc926665adeedf3a4d59"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#a2585921fec3edc926665adeedf3a4d59">comDataN</a> (unsigned char command, const char *data, int size)</td></tr>
<tr class="memdesc:a2585921fec3edc926665adeedf3a4d59"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a command containing exactly the data in the given buffer as argument. <br /></td></tr>
<tr class="separator:a2585921fec3edc926665adeedf3a4d59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac5e9a07d8bb1eeee5cc30474b5cbc26d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#ac5e9a07d8bb1eeee5cc30474b5cbc26d">comInt</a> (unsigned char command, short int argument)</td></tr>
<tr class="memdesc:ac5e9a07d8bb1eeee5cc30474b5cbc26d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a command to the robot with an int for argument.  <a href="#ac5e9a07d8bb1eeee5cc30474b5cbc26d">More...</a><br /></td></tr>
<tr class="separator:ac5e9a07d8bb1eeee5cc30474b5cbc26d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc554733df5a7ee5ba6282a113612652"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#acc554733df5a7ee5ba6282a113612652">comStr</a> (unsigned char command, const char *argument)</td></tr>
<tr class="memdesc:acc554733df5a7ee5ba6282a113612652"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a command to the robot with a length-prefixed string for argument.  <a href="#acc554733df5a7ee5ba6282a113612652">More...</a><br /></td></tr>
<tr class="separator:acc554733df5a7ee5ba6282a113612652"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb996327a899b0a223af99b7440914f3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#aeb996327a899b0a223af99b7440914f3">comStrN</a> (unsigned char command, const char *str, int size)</td></tr>
<tr class="memdesc:aeb996327a899b0a223af99b7440914f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a command to the robot with a length-prefixed string for argument.  <a href="#aeb996327a899b0a223af99b7440914f3">More...</a><br /></td></tr>
<tr class="separator:aeb996327a899b0a223af99b7440914f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a603458e6416079ea02427bbbc4f24146"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a603458e6416079ea02427bbbc4f24146"></a>
<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#a603458e6416079ea02427bbbc4f24146">getDeviceConnection</a> (void)</td></tr>
<tr class="memdesc:a603458e6416079ea02427bbbc4f24146"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the device this instance sends commands to. <br /></td></tr>
<tr class="separator:a603458e6416079ea02427bbbc4f24146"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7839f77480f013fe3cabb8a1267a16b3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#a7839f77480f013fe3cabb8a1267a16b3">sendPacket</a> (<a class="el" href="classArRobotPacket.html">ArRobotPacket</a> *packet)</td></tr>
<tr class="memdesc:a7839f77480f013fe3cabb8a1267a16b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends a <a class="el" href="classArRobotPacket.html" title="Represents the packets sent to the robot as well as those received from it. ">ArRobotPacket</a>.  <a href="#a7839f77480f013fe3cabb8a1267a16b3">More...</a><br /></td></tr>
<tr class="separator:a7839f77480f013fe3cabb8a1267a16b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37cd8e06f77fa55dafdafe81f54b585c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a37cd8e06f77fa55dafdafe81f54b585c"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#a37cd8e06f77fa55dafdafe81f54b585c">setDeviceConnection</a> (<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *deviceConnection)</td></tr>
<tr class="memdesc:a37cd8e06f77fa55dafdafe81f54b585c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the device this instance sends commands to. <br /></td></tr>
<tr class="separator:a37cd8e06f77fa55dafdafe81f54b585c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38a1d03bc0c302ca47e2cc285f4c0e8f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#a38a1d03bc0c302ca47e2cc285f4c0e8f">setPacketSentCallback</a> (<a class="el" href="classArFunctor1.html">ArFunctor1</a>&lt; <a class="el" href="classArRobotPacket.html">ArRobotPacket</a> * &gt; *functor)</td></tr>
<tr class="memdesc:a38a1d03bc0c302ca47e2cc285f4c0e8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the callback that gets called with the finalized version of every packet set...  <a href="#a38a1d03bc0c302ca47e2cc285f4c0e8f">More...</a><br /></td></tr>
<tr class="separator:a38a1d03bc0c302ca47e2cc285f4c0e8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af8861d128f2b8fad67db66f73a7fb9ce"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af8861d128f2b8fad67db66f73a7fb9ce"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setTracking</b> (bool v=true)</td></tr>
<tr class="separator:af8861d128f2b8fad67db66f73a7fb9ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad01c48320b1170f204481e5e99f9acd7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad01c48320b1170f204481e5e99f9acd7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setTrackingLogName</b> (const char *n)</td></tr>
<tr class="separator:ad01c48320b1170f204481e5e99f9acd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab13915067fdabe7f40e2437a3900cd4b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab13915067fdabe7f40e2437a3900cd4b"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classArRobotPacketSender.html#ab13915067fdabe7f40e2437a3900cd4b">~ArRobotPacketSender</a> ()</td></tr>
<tr class="memdesc:ab13915067fdabe7f40e2437a3900cd4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br /></td></tr>
<tr class="separator:ab13915067fdabe7f40e2437a3900cd4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:a6ba63fdcaa23fa87b333f7647b951e82"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ba63fdcaa23fa87b333f7647b951e82"></a>enum &#160;</td><td class="memItemRight" valign="bottom">{ <b>INTARG</b> = 0x3B, 
<b>NINTARG</b> = 0x1B, 
<b>STRARG</b> = 0x2B
 }</td></tr>
<tr class="separator:a6ba63fdcaa23fa87b333f7647b951e82"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:adf3818f15bef88e7d5d466c75362b0dd"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf3818f15bef88e7d5d466c75362b0dd"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>connValid</b> (void)</td></tr>
<tr class="separator:adf3818f15bef88e7d5d466c75362b0dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:aa2b49d7c6699850c447ba974c65ce296"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa2b49d7c6699850c447ba974c65ce296"></a>
<a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>myDeviceConn</b></td></tr>
<tr class="separator:aa2b49d7c6699850c447ba974c65ce296"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4dec821adf177f1e8166e4f791a3cf8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad4dec821adf177f1e8166e4f791a3cf8"></a>
<a class="el" href="classArRobotPacket.html">ArRobotPacket</a>&#160;</td><td class="memItemRight" valign="bottom"><b>myPacket</b></td></tr>
<tr class="separator:ad4dec821adf177f1e8166e4f791a3cf8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a42908d5df2af008aa4f1006e807adbe7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a42908d5df2af008aa4f1006e807adbe7"></a>
<a class="el" href="classArFunctor1.html">ArFunctor1</a>&lt; <a class="el" href="classArRobotPacket.html">ArRobotPacket</a> * &gt; *&#160;</td><td class="memItemRight" valign="bottom"><b>myPacketSentCallback</b></td></tr>
<tr class="separator:a42908d5df2af008aa4f1006e807adbe7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a831b6838c1973bd9c7a38914e4ceb940"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a831b6838c1973bd9c7a38914e4ceb940"></a>
<a class="el" href="classArMutex.html">ArMutex</a>&#160;</td><td class="memItemRight" valign="bottom"><b>mySendingMutex</b></td></tr>
<tr class="separator:a831b6838c1973bd9c7a38914e4ceb940"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a363a6ac7088cc132fb1e6a4d0d1b3a16"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a363a6ac7088cc132fb1e6a4d0d1b3a16"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>myTracking</b></td></tr>
<tr class="separator:a363a6ac7088cc132fb1e6a4d0d1b3a16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4986c987124f9c11d26379d88ee9b3d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae4986c987124f9c11d26379d88ee9b3d"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>myTrackingLogName</b></td></tr>
<tr class="separator:ae4986c987124f9c11d26379d88ee9b3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Given a device connection this sends commands through it to the robot. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a3d6164270a77da60766268ecaf839a84"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArRobotPacketSender::ArRobotPacketSender </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync1</em> = <code>0xfa</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync2</em> = <code>0xfb</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor without an already assigned device connection. </p>
<p>Use <a class="el" href="classArRobotPacketSender.html#a37cd8e06f77fa55dafdafe81f54b585c" title="Sets the device this instance sends commands to. ">setDeviceConnection()</a> to set the device connection before use.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">sync1</td><td>first byte of the header this sender will send, this should be left as the default in nearly all cases, or it won't work with any production robot. ie don't mess with it </td></tr>
    <tr><td class="paramname">sync2</td><td>second byte of the header this sender will send, this should be left as the default in nearly all cases, or it won't work with any production robot. ie don't mess with it </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a71f0b04f8f8d4ecc81d0aee323079996"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArRobotPacketSender::ArRobotPacketSender </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *&#160;</td>
          <td class="paramname"><em>deviceConnection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync1</em> = <code>0xfa</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync2</em> = <code>0xfb</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor with assignment of a device connection. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">deviceConnection</td><td>device connection to send packets to </td></tr>
    <tr><td class="paramname">sync1</td><td>first byte of the header this sender will send, this should be left as the default in nearly all cases, or it won't work with any production robot. ie don't mess with it </td></tr>
    <tr><td class="paramname">sync2</td><td>second byte of the header this sender will send, this should be left as the default in nearly all cases, or it won't work with any production robot. ie don't mess with it </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a5a1324a9c7633a816fa3f20750e95471"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ArRobotPacketSender::ArRobotPacketSender </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArDeviceConnection.html">ArDeviceConnection</a> *&#160;</td>
          <td class="paramname"><em>deviceConnection</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>sync2</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>tracking</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>trackingLogName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor with assignment of a device connection and tracking. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">deviceConnection</td><td>device connection to send packets to </td></tr>
    <tr><td class="paramname">sync1</td><td>first byte of the header this sender will send, this should be left as the default in nearly all cases, or it won't work with any production robot. ie don't mess with it </td></tr>
    <tr><td class="paramname">sync2</td><td>second byte of the header this sender will send, this should be left as the default in nearly all cases, or it won't work with any production robot. ie don't mess with it </td></tr>
    <tr><td class="paramname">tracking</td><td>if true write packet-tracking log messages for each packet sent. </td></tr>
    <tr><td class="paramname">trackingLogName</td><td>name (packet type) to include in packet-tracking log messages </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a8b3525b655931338b9b06d23260caa86"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArRobotPacketSender::com </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>command</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a command to the robot with no arguments. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>the command number to send </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the command could be sent or not </dd></dl>

</div>
</div>
<a class="anchor" id="a972697332d4a79d31472941e54780506"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArRobotPacketSender::com2Bytes </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>high</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char&#160;</td>
          <td class="paramname"><em>low</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a command to the robot with two bytes for argument. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>the command number to send </td></tr>
    <tr><td class="paramname">high</td><td>the high byte to send with the command </td></tr>
    <tr><td class="paramname">low</td><td>the low byte to send with the command </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the command could be sent or not </dd></dl>

</div>
</div>
<a class="anchor" id="ac5e9a07d8bb1eeee5cc30474b5cbc26d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArRobotPacketSender::comInt </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">short int&#160;</td>
          <td class="paramname"><em>argument</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a command to the robot with an int for argument. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>the command number to send </td></tr>
    <tr><td class="paramname">argument</td><td>the integer argument to send with the command </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the command could be sent or not </dd></dl>

</div>
</div>
<a class="anchor" id="acc554733df5a7ee5ba6282a113612652"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArRobotPacketSender::comStr </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>argument</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a command to the robot with a length-prefixed string for argument. </p>
<p>Sends a length-prefixed string command.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>the command number to send </td></tr>
    <tr><td class="paramname">argument</td><td>NULL-terminated string to send with the command </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the command could be sent or not </dd></dl>

</div>
</div>
<a class="anchor" id="aeb996327a899b0a223af99b7440914f3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArRobotPacketSender::comStrN </td>
          <td>(</td>
          <td class="paramtype">unsigned char&#160;</td>
          <td class="paramname"><em>command</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a command to the robot with a length-prefixed string for argument. </p>
<p>Sends a packet containing the given command, and a length-prefixed string containing the specified number of bytes copied from the given source string.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">command</td><td>the command number to send </td></tr>
    <tr><td class="paramname">str</td><td>the character array containing data to send with the command </td></tr>
    <tr><td class="paramname">size</td><td>number of bytes from the array to send; prefix the string with a byte containing this value as well. this size must be less than the maximum packet size of 200 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the command could be sent or not </dd></dl>

</div>
</div>
<a class="anchor" id="a7839f77480f013fe3cabb8a1267a16b3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ArRobotPacketSender::sendPacket </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArRobotPacket.html">ArRobotPacket</a> *&#160;</td>
          <td class="paramname"><em>packet</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sends a <a class="el" href="classArRobotPacket.html" title="Represents the packets sent to the robot as well as those received from it. ">ArRobotPacket</a>. </p>
<p>Sends an <a class="el" href="classArRobotPacket.html" title="Represents the packets sent to the robot as well as those received from it. ">ArRobotPacket</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">packet</td><td><a class="el" href="classArRobotPacket.html" title="Represents the packets sent to the robot as well as those received from it. ">ArRobotPacket</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the command could be sent or not </dd></dl>

</div>
</div>
<a class="anchor" id="a38a1d03bc0c302ca47e2cc285f4c0e8f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ArRobotPacketSender::setPacketSentCallback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classArFunctor1.html">ArFunctor1</a>&lt; <a class="el" href="classArRobotPacket.html">ArRobotPacket</a> * &gt; *&#160;</td>
          <td class="paramname"><em>functor</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the callback that gets called with the finalized version of every packet set... </p>
<p>this is ONLY for very internal very specialized use </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>ArRobotPacketSender.h</li>
<li>ArRobotPacketSender.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="classArRobotPacketSender.html">ArRobotPacketSender</a></li>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
